<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>采购需求详情</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta http-equiv="content-type" content="text/html;charset=utf-8">

<link rel="stylesheet" href="js/easyui/demo/demo.css" type="text/css"></link>
<link rel="stylesheet" href="js/easyui/themes/icon.css" type="text/css"></link>
<link rel="stylesheet" href="js/easyui/themes/default/easyui.css" type="text/css"></link>

<script type="text/javascript" src="js/easyui/jquery-1.6.min.js"></script>
<script type="text/javascript" src="js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/easyui/themes/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="script/common.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css">

<script type="text/javascript" charset="UTF-8">

	
	/**
     *下载文件
     */
   	 function downloadFile(){  
   		var blueprint= $("#blueprint").val();
   	 	window.location = 'procurepdownFile.action?fileName='+blueprint;
   	 } 
 
   	     	
   /**
    *返回
    */
    function goBackFavor(url,title){
    
    	var tabbar = window.parent.$('#tabs');
		var tab = tabbar.tabs('getSelected');

		if (tab){
			var index = tabbar.tabs('getTabIndex', tab);
		
			if(url != null){
				addPanelExists(url,title);
				tabbar.tabs('close', index);
			}else{
				tabbar.tabs('close', index);
			}
		}
    }
</script>

<style type="text/css">
	.form-table {
		width:100%;
		padding: 20px 0px 20px 40px;
	}
	
	.form-table tr td {
		padding:5px;
	}
	
	.form-table tr td:first-child {
		width: 7.5em;
	}
	
</style>
<body>
	<div id="content" style="width: 100%;">
		<form id="procureProductForm" action="" id="saveProductPartForm" method="post">
			<div id="contentOne" style="width: 70%;float: left;">
				<table class="form-table">
					<tr>
						<td>产品款号</td>
						<td>
							<input class="easyui-textbox" id="productCode" name="procureProduct.productCode" style="width: 120px; height: 26px;" readonly="true" value="${procureProduct.productCode }"/> 
							<input class="easyui-linkbutton" type="button" id="query" style="border-color: #95B8E7; color: #95B8E7" onclick="showProductList()" value="…" disabled="disabled">
						</td>
						
						<td>供应商数量</td>
						<td>
							<input class="easyui-textbox" id="" name="procureProduct.suppelierCount"  style="height: 26px;" value="${procureProduct.suppelierCount }" disabled="disabled"/>
						</td>
					</tr>
					
					<tr>
						<td>采购数量</td>
						<td>
							<input class="easyui-textbox" id="" name="procureProduct.procCount"  style="height: 26px;" value="${procureProduct.procCount }" disabled="disabled"/>
						</td>
						
						<td>交货时间</td>
						<td >
							<input class="easyui-datebox" id="" name="procureProduct.deliveryDate"  style="height:26px;"  value="${procureProduct.deliveryDate }" disabled="disabled"/>
						</td>
					</tr>
					
					<tr>
						<td>开始时间</td>
						<td>
							<input class="easyui-datebox" id="" name="procureProduct.startTime"  style="height: 26px;" value="${procureProduct.startTime }" disabled="disabled"/>
						</td>
						
						<td>结束时间</td>
						<td >
							<input class="easyui-datebox" id="" name="procureProduct.endTime"  style="height:26px;" value="${procureProduct.endTime }" disabled="disabled"/>
							<input name="procureProduct.blueprint"  id="blueprint" style="display:none;" value="${procureProduct.blueprint }" /> 
						</td>
					</tr>
					
					<tr>
						<td></td>
						<td>
							<img alt="" src="images/attachment.png" style="height: 26px;" ></img><a onclick="downloadFile()" style="cursor:pointer"><span id="attachment">${procureProduct.blueprint}</span></a>
						</td>
					</tr> 
				</table>
			</div>	
			
			<div style="margin-left:40px;padding-top: 240px">
				<span style="display:block;display:inline-block;"><h2>按sku采购</h2></span>
				<div style="margin-bottom:10px;border:1px solid #95B8E7;width:60%;">
				 	<table>
				 		<tr id="sizeTr">
				 			<c:forEach var="s" items="${hsco}">
								<td>
									<input type="checkbox" name="szid" value="+${s}+" disabled="disabled"/>${s}
								</td>
							</c:forEach>
				 		</tr>
				 		<tr id="colorTr">
				 			<c:forEach var="z" items="${hssz}">
								<td>
									<input type="checkbox" name="coid" value="+${z}+" disabled="disabled"/>${z}
								</td>
							</c:forEach>
				 		</tr>
				 	</table>
				</div>
				<table id="sku" class="easyui-datagrid" style="width:45%;" singleSelect="true" id="partCrafs">
					<thead>
						<tr>
							<th data-options="field:'code'" width="" align="center">序号</th>
							<th data-options="field:'skuCode'" width="150px" align="center">产品SKU</th>
							<th data-options="field:'cona'" width="100px" align="center" width="110px;">颜色</th>
							<th data-options="field:'szid'" width="100px" align="center">尺寸</th>
							<th data-options="field:'purchaseNum'" width="100px" align="center" editor="text">采购数量</th>
							<th data-options="field:'productCode'" hidden="true" align="center" >产品编码</th>
							<th data-options="field:'coloId'" hidden="true" align="center" >颜色id</th>
							<th data-options="field:'colo'" hidden="true" align="center" >颜色编码</th>
							<th data-options="field:'szco'" hidden="true" align="center" >尺寸编码</th>
						</tr>
					</thead>
					<c:forEach items="${productSkus}" var="productSkus" varStatus="i">
							<tr>
								
								<td>
									<c:out value="${i.index+1+offset*10 }" ></c:out>
								</td>
								
								<td>
									<c:out value="${productSkus.skuCode}" ></c:out>
								</td>
								
								<td>
									<c:out value="${productSkus.cona}" ></c:out>
								</td>
								
								<td>
									<c:out value="${productSkus.szid}" ></c:out>
								</td>
								
								<td>
									<c:out value="${productSkus.purchaseNum}" ></c:out>
								</td>
								
								<td>
									<c:out value="${productSkus.productCode}"></c:out>
								</td>
								
								<td>
									<c:out value="${productSkus.coloId}"></c:out>
								</td>
								<td>
									<c:out value="${productSkus.colo}"></c:out>
								</td>
								<td>
									<c:out value="${productSkus.szco}"></c:out>
								</td>
							</tr>
						</c:forEach>
				</table>
			</div>
			<div style="margin-top: 30px;margin-left: 360px; ">
				<a class="easyui-linkbutton" onclick="removeCurrentPanel();" >返回</a>
			</div>
		</form>
	</div>
</body>
</html>